Imports System.Threading

Module JoinMultipleThreads

    Public A As Thread
    Public B As Thread
    Public C As Thread

    Sub DisplayA()
        B.Join()
        C.Join()
        For I As Integer= 0 To 100
            Console.Write("A")
        Next
    End Sub

    Sub DisplayB()
        For I As Integer= 0 To 100
            Console.Write("B")
        Next
    End Sub

    Sub DisplayC()
        For I As Integer= 0 To 100
            Console.Write("C")
        Next
    End Sub

    Sub Main()

        A = New Thread(AddressOf DisplayA)
        B = New Thread(AddressOf DisplayB)
        C = New Thread(AddressOf DisplayC)

        C.Start()
        B.Start()
        A.Start()

        Console.ReadLine()  
    End Sub
End Module
